﻿//加载页面js
$(document).ready(function(){
	var chart;
	initPage();
});

function initPage() {	
	$('div.c_right').tabs({
		containerClass: "c_r_body",
		selectedClass: "on",
		hash: true
	});
	//查询信息列表
 
	
	 $("#button_2d").click(function() {
		$("#result_search").warning(TXT_POSTDATA);
		$('#scform').disabled();
		$("chartdiv").html("");
		//显示统计图表
		chart = new FusionCharts("../js/FusionCharts/MSColumn2D.swf", "ChartId", "800", "350", "0", "0");
		chart.addParam('wmode', 'opaque');
		var url= "../db/statistics_trend_total_xml.asp?ksrq="+$("#ksrq").val()+"&jsrq="+$("#jsrq").val();
		//$("#div_rslist").warning(url);
		chart.setDataURL(url);  
		chart.render("chartdiv");
		
		setTimeout( function() {									
			$('#scform').enabled();
			$("#result_search").warning("");
		}, 800);
     }); 
	 $("#button_3d").click(function() {
		 $("chartdiv").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/MSColumn3D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 chart.setDataURL("../db/statistics_trend_total_xml.asp?ksrq="+$("#ksrq").val()+"&jsrq="+$("#jsrq").val());  
		 //alert("../db/statistics_trend_total_xml.asp?xxly="+$("#xxly").val()+"&ksrq="+$("#ksrq").val()+"&jsrq="+$("#jsrq").val());  
		 chart.render("chartdiv");
		 setTimeout( function() {									
			 $('#scform').enabled();
			 $("#result_search").warning("");
		 }, 800);
	 }); 
	 $("#button_ScrollColumn2D").click(function() {
		 $("chartdiv").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/ScrollColumn2D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 chart.setDataURL("../db/statistics_trend_total_xml.asp?ksrq="+$("#ksrq").val()+"&jsrq="+$("#jsrq").val());  
		 chart.render("chartdiv");
		 setTimeout( function() {									
			 $('#scform').enabled();
			 $("#result_search").warning("");
		 }, 800);
	 }); 

}


 
 